{
	"info": {
		"_postman_id": "2bc80d9c-deb5-40f3-bbbc-5d43666cd1be",
		"name": "Delta DocStore",
		"description": "Calling Delta DocStore APIs sample.\n\nIn order to run the requests, set the value of the variable \"baseUrl\" to the Delta base URL you want to reach (e.g.: [https://delta.switch.lu](https://delta.switch.lu)), and replace the value of the variable \"subscriptionKey\" with your subscription key.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "23778077"
	},
	"item": [
		{
			"name": "Get new token",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"let jsonData = pm.response.json();\r",
							"let accessToken = jsonData.accessToken.token;\r",
							"pm.collectionVariables.set(\"accessToken\", accessToken);"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"keyType\": \"subscriptionKey\",\r\n  \"key\": \"{{subscriptionKey}}\"\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{baseUrl}}/Master/Tokens/New",
					"host": [
						"{{baseUrl}}"
					],
					"path": [
						"Master",
						"Tokens",
						"New"
					]
				},
				"description": "Gets an authorization JWT token based on your Delta subscription key."
			},
			"response": []
		},
		{
			"name": "Get document list",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{baseUrl}}/DocStore/Documents?maxRows=3&sortOrder=byDateDesc",
					"host": [
						"{{baseUrl}}"
					],
					"path": [
						"DocStore",
						"Documents"
					],
					"query": [
						{
							"key": "maxRows",
							"value": "3"
						},
						{
							"key": "sortOrder",
							"value": "byDateDesc"
						}
					]
				},
				"description": "Gets a simple list of documents. To have more filtering options use other example."
			},
			"response": []
		},
		{
			"name": "Get filtered document list",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"modelNames\": [\"Default\"],\r\n    \"tagFilterExp\": \"Validated=No\",\r\n    \"retrieveTags\": [\"Author\", \"Title\", \"Validated\"],\r\n    \"maxRows\": 10\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{baseUrl}}/DocStore/Documents/Filter",
					"host": [
						"{{baseUrl}}"
					],
					"path": [
						"DocStore",
						"Documents",
						"Filter"
					]
				},
				"description": "Gets a filtered list of documents specifying a filter and the meta tags to return.\n\n(See the parameter [\"tagFilterExp\" syntax](https://delta.switch.lu/DocStore/index.html#/Documents/get_Documents_Tags_FilterExpressions_Validate))"
			},
			"response": []
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{accessToken}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "baseUrl",
			"value": "https://delta.switch.lu",
			"type": "default"
		},
		{
			"key": "subscriptionKey",
			"value": "<your subscription key>",
			"type": "default"
		},
		{
			"key": "accessToken",
			"value": "",
			"type": "string"
		}
	]
}